package com.mobile.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author Encounter
 * @date 2024/10/02 18:33<br/>
 */
@Mapper
public interface CheckGroupCheckItemMapper
    {
        
        /**
         * 找到检查项目IDS由检查群id
         *
         * @return {@link List }<{@link Integer }>
         */
        @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{checkGroupId}")
        List<Integer> findCheckItemIdsByCheckGroupId(Integer checkGroupId);
        
        /**
         * 插入
         *
         * @param map 要插入的信息
         */
        @Insert("insert into t_checkgroup_checkitem(checkitem_id,checkgroup_id)" +
                "values (#{checkItemId},#{checkGroupId})")
        void insert(Map<String, Integer> map);
    }
